
package com.tal.bcc.pad.cloud.upload;

import java.io.File;
import java.util.HashMap;
import java.util.Map;

public class HttpRequestParams {
    private Map<String, String> bodyParams;
    private Map<String, String> headerParams = new HashMap();
    private Map<String, File> fileParams;
    private int contentType;
    private String json;
    private int writeAndreadTimeOut = -1;
    public static final int IMAGE_TYPE = 1;
    public static final int AUDIO_TYPE = 2;
    public static final int VIDEO_TYPE = 3;
    public static final int MULTI_PART = 4;
    public static final int APPLICATION_TYPE = 4;
    private boolean isCloseDefaultParams = false;

    public HttpRequestParams() {
    }

    public void addBodyParam(String key, String value) {
        if (this.bodyParams == null) {
            this.bodyParams = new HashMap();
        }

        this.bodyParams.put(key, value);
    }

    public void addHeaderParam(String key, String value) {
        if (this.headerParams == null) {
            this.headerParams = new HashMap();
        }

        this.headerParams.put(key, value);
    }

    public void addFileParam(String key, File file) {
        if (this.fileParams == null) {
            this.fileParams = new HashMap();
        }

        this.fileParams.put(key, file);
    }

    public Map<String, String> getBodyParams() {
        return this.bodyParams;
    }

    public Map<String, String> getHeaderParams() {
        return this.headerParams;
    }

    public Map<String, File> getFileParams() {
        return this.fileParams;
    }

    public String getContentType() {
        return this.contentType + "";
    }

    public void setContentType(int contentType) {
        this.contentType = contentType;
    }

    public int getWriteAndreadTimeOut() {
        return this.writeAndreadTimeOut;
    }

    public void setWriteAndreadTimeOut(int writeAndreadTimeOut) {
        this.writeAndreadTimeOut = writeAndreadTimeOut;
    }

    public boolean isCloseDefaultParams() {
        return this.isCloseDefaultParams;
    }

    public void setCloseDefaultParams(boolean closeDefaultParams) {
        this.isCloseDefaultParams = closeDefaultParams;
    }

    public String getJson() {
        return this.json;
    }

    public void setJson(String json) {
        this.json = json;
    }
}
